package com.itheima.ZuoYe;

import java.util.Scanner;

public class Test401 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入");
        String s = sc.nextLine();

        int bigcount = 0;
        int smallcount = 0;
        int numcount = 0;

        //遍历字符串,得到每一个字符
        char[] chars = s.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            char c = chars[i];
            if(c >= 'A' && c <= 'Z'){
                bigcount++;
            }else if(c >='a' && c <= 'z'){
                smallcount++;
            }else if(c >= '0' && c <= '9'){
                numcount++;
            }
        }
        int num = bigcount + smallcount;
        System.out.println("英文字母字符:" + num);
        System.out.println("数字字符:" + numcount);
    }
}
